package com.boarsoft.wechat.entity;

import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

import com.boarsoft.common.Util;

public class WeChatTemplate implements Serializable {

	/**
	 * 
	 */
	private static final long serialVersionUID = 8592885250798677088L;

	public static final String WECHAT_TEMPLATE_STATUS_UNPUBLISH = "0";
	public static final String WECHAT_TEMPLATE_STATUS_PUBLISH = "1";

	/** 内容模板ID **/
	private String id;
	/** 内容模板编号 **/
	private String code;
	/** 内容模板名称 **/
	private String name;
	/** 微信模板ID **/
	private String templateId;
	/** 微信公众号id **/
	private String platformFakeId;
	/** 发布状态 **/
	private String status;
	/** 微信所需跳转到的小程序app id **/
	private String miniProgramAppId;
	/** 微信所需跳转到小程序的具体页面路径，支持带参数 **/
	private String miniProgramPagePath;
	/** 微信模板跳转链接 **/
	private String url;
	/** 发送账号主键 **/
	private String sendAccKey;
	/** 微信模板中需要替换的数据关键字 **/
	private String dataKey;
	/** 微信模板内容字体颜色 **/
	private String dataColor;
	/** 微信模板数据转化规则 **/
	private String dataRule;
	/** 模板内容 **/
	private String content;
	/** 模板设备 **/
	private String device;
	/** 备注 **/
	private String memo;
	/** 微信模板与消息类型关系维护 **/
	private Set<MsgType> msgTypes = new HashSet<MsgType>();

	public boolean validate() {
		return !((Util.strIsEmpty(code) || Util.strIsEmpty(name) || Util.strIsEmpty(templateId)
				|| Util.strIsEmpty(platformFakeId) || Util.strIsEmpty(sendAccKey) || Util.strIsEmpty(dataKey)
				|| Util.strIsEmpty(content) || Util.strIsEmpty(device)));
	}

	public String getId() {
		return id;
	}

	public void setId(String id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getName() {
		return name;
	}

	public void setName(String name) {
		this.name = name;
	}

	public String getTemplateId() {
		return templateId;
	}

	public void setTemplateId(String templateId) {
		this.templateId = templateId;
	}

	public String getPlatformFakeId() {
		return platformFakeId;
	}

	public void setPlatformFakeId(String platformFakeId) {
		this.platformFakeId = platformFakeId;
	}

	public String getStatus() {
		return status;
	}

	public void setStatus(String status) {
		this.status = status;
	}

	public String getMiniProgramAppId() {
		return miniProgramAppId;
	}

	public void setMiniProgramAppId(String miniProgramAppId) {
		this.miniProgramAppId = miniProgramAppId;
	}

	public String getMiniProgramPagePath() {
		return miniProgramPagePath;
	}

	public void setMiniProgramPagePath(String miniProgramPagePath) {
		this.miniProgramPagePath = miniProgramPagePath;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public String getSendAccKey() {
		return sendAccKey;
	}

	public void setSendAccKey(String sendAccKey) {
		this.sendAccKey = sendAccKey;
	}

	public String getDataKey() {
		return dataKey;
	}

	public void setDataKey(String dataKey) {
		this.dataKey = dataKey;
	}

	public String getDataColor() {
		return dataColor;
	}

	public void setDataColor(String dataColor) {
		this.dataColor = dataColor;
	}

	public String getContent() {
		return content;
	}

	public void setContent(String content) {
		this.content = content;
	}

	public String getDevice() {
		return device;
	}

	public void setDevice(String device) {
		this.device = device;
	}

	public String getMemo() {
		return memo;
	}

	public void setMemo(String memo) {
		this.memo = memo;
	}

	public Set<MsgType> getMsgTypes() {
		return msgTypes;
	}

	public void setMsgTypes(Set<MsgType> msgTypes) {
		this.msgTypes = msgTypes;
	}

	public String getDataRule() {
		return dataRule;
	}

	public void setDataRule(String dataRule) {
		this.dataRule = dataRule;
	}

}
